<div class="btn-group form-inline">
    <?php
    //日期选择按钮
    $dateTypeEnum = config('enums.date_type');
    $html = '';

    foreach ($dateTypeEnum as $key => $value) {
        if (isset($dataType) && $key > $dataType) {
            break;
        }
        $css = 'btn-white';
        if ($reqDataType == $key) {
            $css = 'btn-primary';
        }

        $onClock = "$('input[name=\'data_type\']').val({$key});document.forms[0].submit();";
        $html .= "<button class=\"btn-sm {$css}\" type=\"button\" onclick=\"{$onClock}\">{$value}</button>";
    }
    echo $html;
    ?>
    <input type="hidden" name="data_type" value="0"/>
</div>